import { Field, Int, ObjectType } from "@nestjs/graphql";
import { BaseEntity } from "./baseEntity";
import { Goods } from "@prisma/client";
import { ShopEntity } from "./shop.entity";


@ObjectType()
export class GoodsEntity extends BaseEntity implements Goods {
    @Field()
    price: number;

    @Field(() => Int)
    status: boolean;

    @Field()
    hash_key: string

    @Field()
    menu: string;

    @Field(() => Int)
    shopId: number;

    @Field(() => ShopEntity)
    shop?: ShopEntity

    @Field()
    name: string;

    @Field({ nullable: true })
    information: string;
}